package com.itheima.io1.mytest;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author zhangbaiyan
 * @date 2024-09-21 13:31
 * @description:
 * @version:
 */
public class test4 {
    public static void main(String[] args) throws IOException {
        //创建字符缓冲输入流对象
        BufferedReader br = new BufferedReader(new FileReader("a.txt"));
        //2.读取数据
        String line;
        while ((line = br.readLine())!=null){
            System.out.println(line);
        }
        //3.关闭流
        br.close();

    }
}
